using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GeoFramework.Gps.Nmea;

namespace GeoFramework.Examples
{
    public partial class DetectingDevicesForm : Form
    {
        public DetectingDevicesForm()
        {
            InitializeComponent();

            /* The Devices class is used to get information on available GPS devices.  The
             * GetDeviceByProtocol(NmeaInterpreter.ProtocolName) property is very useful.  Calling this property  
             * will automatically perform device detection if it is needed, and the property
             * returns with the device which is fastest to respond.  Device detection then
             * continues in the background until the entire computer has been scanned.
             * 
             * This is the fastest possible way to obtain a GPS device.
             */

            DevicePropertyGrid.SelectedObject = GeoFramework.IO.Devices.GetDeviceByProtocol(NmeaInterpreter.ProtocolName);
        }
    }
}